package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_findEntityByCompositeProperities implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_findEntityByCompositeProperities() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_java_format_1_1 = new TagInfo("java:format", //$NON-NLS-1$
            1, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_4_13 = new TagInfo("c:get", //$NON-NLS-1$
            4, 13,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_69 = new TagInfo("c:get", //$NON-NLS-1$
            4, 69,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_5_29 = new TagInfo("c:get", //$NON-NLS-1$
            5, 29,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_9_13 = new TagInfo("c:get", //$NON-NLS-1$
            9, 13,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_9_69 = new TagInfo("c:get", //$NON-NLS-1$
            9, 69,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_91 = new TagInfo("c:get", //$NON-NLS-1$
            10, 91,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_12_7 = new TagInfo("c:get", //$NON-NLS-1$
            12, 7,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_12_59 = new TagInfo("c:get", //$NON-NLS-1$
            12, 59,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_14_13 = new TagInfo("c:get", //$NON-NLS-1$
            14, 13,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        RuntimeTagElement _jettag_java_format_1_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_1_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_1_1.setRuntimeParent(null);
        _jettag_java_format_1_1.setTagInfo(_td_java_format_1_1);
        _jettag_java_format_1_1.doStart(context, out);
        JET2Writer _jettag_java_format_1_1_saved_out = out;
        while (_jettag_java_format_1_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            out.write("\t@SuppressWarnings(\"unchecked\")");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t@Transactional");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tpublic Set<");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_4_13 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_13); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_4_13.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_4_13.setTagInfo(_td_c_get_4_13);
            _jettag_c_get_4_13.doStart(context, out);
            _jettag_c_get_4_13.doEnd();
            out.write("> find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_4_69 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_69); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_4_69.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_4_69.setTagInfo(_td_c_get_4_69);
            _jettag_c_get_4_69.doStart(context, out);
            _jettag_c_get_4_69.doEnd();
            out.write("ByCompositeProperities(String sql,int startResult, int maxRows){");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t\treturn  new LinkedHashSet<");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_5_29 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_29); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_5_29.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_5_29.setTagInfo(_td_c_get_5_29);
            _jettag_c_get_5_29.doStart(context, out);
            _jettag_c_get_5_29.doEnd();
            out.write(">(createQuery(sql,startResult,maxRows).getResultList());");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t}");  //$NON-NLS-1$        
            out.write(NL);         
            out.write(NL);         
            out.write("\t@Transactional");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tpublic Set<");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_9_13 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_9_13); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_9_13.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_9_13.setTagInfo(_td_c_get_9_13);
            _jettag_c_get_9_13.doStart(context, out);
            _jettag_c_get_9_13.doEnd();
            out.write("> find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_9_69 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_9_69); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_9_69.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_9_69.setTagInfo(_td_c_get_9_69);
            _jettag_c_get_9_69.doStart(context, out);
            _jettag_c_get_9_69.doEnd();
            out.write("sByDetachedCriteria(CmiPagination page)throws DataAccessException {");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t\tDetachedCriteria detachedCriteria= CmiDetachedCriteriaUtil.createDetachedCriteria(page, ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_10_91 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_91); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_10_91.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_10_91.setTagInfo(_td_c_get_10_91);
            _jettag_c_get_10_91.doStart(context, out);
            _jettag_c_get_10_91.doEnd();
            out.write(".class);");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t\tSession session = entityManager.unwrap(org.hibernate.Session.class);");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t\tSet<");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_12_7 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_7); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_12_7.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_12_7.setTagInfo(_td_c_get_12_7);
            _jettag_c_get_12_7.doStart(context, out);
            _jettag_c_get_12_7.doEnd();
            out.write("> ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_12_59 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_59); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_12_59.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_12_59.setTagInfo(_td_c_get_12_59);
            _jettag_c_get_12_59.doStart(context, out);
            _jettag_c_get_12_59.doEnd();
            out.write("s=new HashSet(detachedCriteria.getExecutableCriteria(session).setFirstResult(page.getSearchBeginCursor()).setMaxResults(page.getPaginationSize()).list());");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t    ");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t    return ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_14_13 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_14_13); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_14_13.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_14_13.setTagInfo(_td_c_get_14_13);
            _jettag_c_get_14_13.doStart(context, out);
            _jettag_c_get_14_13.doEnd();
            out.write("s;");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t}");  //$NON-NLS-1$        
            out.write(NL);         
            _jettag_java_format_1_1.handleBodyContent(out);
        }
        out = _jettag_java_format_1_1_saved_out;
        _jettag_java_format_1_1.doEnd();
    }
}
